<?php

namespace app\admin\controller;

use app\BaseController;
use app\admin\controller\Tool as Tool;

use app\model\Verification as ModelVerification;
use app\Request;

class Verification extends BaseController
{
     // /**
     //  * 获取验证码
     //  * @author L
     //  */
     // public function getVerification()
     // {
     //      $data = [
     //           'verification_img'
     //      ];
     //      $Verfication = Tool::AllRandGetText(ModelVerification::class, 'verification_id', $data);
     //      return $Verfication;
     // }
     // /**
     //  * 验证码判断
     //  * @author L
     //  */
     // public function Verification_Judgment(Request $request)
     // {
     //      $params = $request->param();
     //      $this->validate($params, [
     //           'verification_img|图片路径' => 'require',
     //           'answer|验证答案' => 'require',
     //      ]);
     //      $Judgment = ModelVerification::where('verification_img', $params['verification_img'])->field([
     //           'verification_answer'
     //      ])->find();
     //      // 拿值判断
     //      if($params['answer'] == $Judgment['verification_answer'])
     //      {
     //           $rtn = Tool::msg(200,"验证通过!");
     //           return $rtn;
     //      }else{
     //           $rtn = Tool::msg(404,"验证失败!");
     //           return $rtn;
     //      }
        
     // }
}
